package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.domain.TreeMyEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

/**
 * 分类业务对象 p_category
 *
 * @author ruoyi
 * @date 2022-08-02
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("分类业务对象")
public class PCategoryBo extends TreeMyEntity<PCategoryBo> {

    /**
     *
     */
    @ApiModelProperty(value = "", required = true)
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

//    /**
//     * 父级ID
//     */
//    @ApiModelProperty(value = "父级ID", required = true)
//    @NotNull(message = "父级ID不能为空", groups = { AddGroup.class, EditGroup.class })
//    private Long pid;

    /**
     * 路径
     */
    @ApiModelProperty(value = "路径", required = true)
    private String path;

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称", required = true)
    @NotBlank(message = "分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 类型，1 产品分类，2 附件分类，3 文章分类， 4 设置分类， 5 菜单分类，6 配置分类， 7 秒杀配置
     */
    @ApiModelProperty(value = "类型，1 产品分类，2 附件分类，3 文章分类， 4 设置分类， 5 菜单分类，6 配置分类， 7 秒杀配置", required = true)
    private String type;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址", required = true)
    private String url;

    /**
     * 扩展字段 Jsos格式
     */
    @ApiModelProperty(value = "扩展字段 Jsos格式", required = true)
    private String extra;

    /**
     * 状态, 1正常，0失效
     */
    @ApiModelProperty(value = "状态, 1正常，0失效", required = true)
    private Integer status;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序", required = true)
    private Integer sort;


}
